package com.hgts.pojo.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hgts.pojo.Book;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class BookDto extends Book {

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("图书名称")
    private String name;

    @ApiModelProperty("图书作者")
    private String author;

    @ApiModelProperty("图书价格")
    private BigDecimal price;

    @ApiModelProperty("图书类型id")
    private Integer typeId;

    @ApiModelProperty("图书详情")
    private String description;

    @ApiModelProperty("0 未借出 1 已借出")
    private Integer status;
    @ApiModelProperty("图书类型")
    private String type;

    @ApiModelProperty("0 未删除 1 已删除")
    private int isDelete;

    @ApiModelProperty("库存 默认10")
    private int stock;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private String endTime;

    private String[] timeArr;
}
